unit CargoSearchFr;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  ExtCtrls, Buttons, StdCtrls, MainSearchFr;

type

  { TCargoSearchFrame }

  TCargoSearchFrame = class(TMainSearchFrame)
    id_cargo: TEdit;
    desc_cargo: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    procedure LocalizarButtonClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

implementation

uses CargoDM,QueryConditions;

{ TCargoSearchFrame }

procedure TCargoSearchFrame.LocalizarButtonClick(Sender: TObject);
 var
  condicoes: TQueryConditions;
begin
  condicoes := TQueryConditions.Create(CON_AND);
  condicoes.Add('id_cargo', id_cargo.Text);
  condicoes.AddText('desc_cargo', desc_cargo.Text);
  CargoData.Search(Condicoes, 'cargo');
end;

initialization
  {$I cargosearchfr.lrs}

end.

